package day16.tarena.GUI;
import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.swing.JFrame;
import javax.swing.JButton;
import javax.swing.JTextField;
public class TestBorder {
	public static void main(String[] args) {
		JFrame jf = new JFrame("Test FLow");
		String[] lab = {"东east","南south","西weast","北North","中center"};
		String[] pos = {BorderLayout.EAST,
				BorderLayout.SOUTH,
				BorderLayout.WEST,
				BorderLayout.NORTH,
				BorderLayout.CENTER};
		JButton[] jb = new JButton[lab.length];
		for(int i=0; i<jb.length; i++){
			jb[i] = new JButton(lab[i]);
			jf.add(jb[i],pos[i]);
		}
		jf.setLocation(300,200);
		jf.setSize(300,200);
		jf.setVisible(true);
		jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

	}

}
